//top效果
$(function(){
	$("#top .order").mouseover(function(){
		$(this).css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
		$("#order_us").slideDown().mouseover(function(){
			$("#top .order").css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
			$(this).show();
			$("#order_us a").mouseover(function(){
				$(this).css({"color":"#661166"});
			}).mouseout(function(){
				$(this).css({"color":"#999"});
			});
		}).mouseout(function(){
			$("#top .order").css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
			$(this).hide();
		});
	}).mouseout(function(){
		$(this).css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
		$("#order_us").hide();
	});
	$("#top .us").mouseover(function(){
		$(this).css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
		$("#fllow_us").slideDown().mouseover(function(){
			$("#top .us").css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
			$(this).show();
			$("#fllow_us a").mouseover(function(){
				$(this).css({"color":"#661166"});
			}).mouseout(function(){
				$(this).css({"color":"#999"});
			});
		}).mouseout(function(){
			$("#top .us").css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
			$(this).hide();
		});
	}).mouseout(function(){
		$(this).css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
		$("#fllow_us").hide();
	});
	$("#top .service").mouseover(function(){
		$(this).css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
		$("#service_us").slideDown().mouseover(function(){
			$("#top .service").css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
			$(this).show();
			$("#service_us a").mouseover(function(){
				$(this).css({"color":"#661166"});
			}).mouseout(function(){
				$(this).css({"color":"#999"});
			});
		}).mouseout(function(){
			$("#top .service").css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
			$(this).hide();
		});
	}).mouseout(function(){
		$(this).css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
		$("#service_us").hide();
	});
	$("#top .business").mouseover(function(){
		$(this).css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
		$("#business_us").slideDown().mouseover(function(){
			$("#top .business").css({"background":"url(images/top_up.gif) no-repeat 65px 15px #fff","color":"#661166"});
			$(this).show();
			$("#business_us a").mouseover(function(){
				$(this).css({"color":"#661166"});
			}).mouseout(function(){
				$(this).css({"color":"#999"});
			});
		}).mouseout(function(){
			$("#top .business").css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
			$(this).hide();
		});
	}).mouseout(function(){
		$(this).css({"background":"url(images/top_down.gif) no-repeat 65px 15px #f7f7f7","color":"#999"});
		$("#business_us").hide();
	});

	//side效果
	var timer_men;
	$("#side .side_men").mouseover(function(){
		clearInterval(timer_men);
		$("#side .men").css("display","block").animate({"right":"36"},200)
	}).mouseout(function(){
		timer_men=setTimeout(function(){
			$("#side .men").css({"right":"50px","display":"none"});
		},300);
	});
	$("#side .men").mouseover(function(){
		$(this).css({"right":"36px","display":"block"});
		clearInterval(timer_men);
	}).mouseout(function(){
		$(this).css({"right":"50px","display":"none"});
	});

	$("#side .side_cart").toggle(function(){
		$(this).css({"background":"#616"});
		$("#side .cart").css("display","block").animate({"right":"36"},200);
	},function(){
		$("#side .cart").css("display","block").animate({"right":"-336"},200);
		$(this).css({"background":"#000"});
	});
	
	var timer_start;
	$("#side .side_start").mouseover(function(){
		$("#side .start").css("display","block").animate({"right":"36"},200);
	}).mouseout(function(){
		timer_start=setTimeout(function(){
			$("#side .start").css({"right":"50px","display":"none"});
		},300);
	});
	$("#side .start").mouseover(function(){
		clearInterval(timer_start);
		$(this).css({"right":"36px","display":"block"});
	}).mouseout(function(){
		$(this).css({"right":"50px","display":"none"});
	});
	
	var timer_history;
	$("#side .side_history").mouseover(function(){
		$("#side .history").css("display","block").animate({"right":"36"},200);
	}).mouseout(function(){
		timer_history=setTimeout(function(){
			$("#side .history").css({"right":"50px","display":"none"});
		},300);
	});
	$("#side .history").mouseover(function(){
		clearInterval(timer_history);
		$(this).css({"right":"36px","display":"block"});
	}).mouseout(function(){
		$(this).css({"right":"50px","display":"none"});
	});
	
	var timer_news;
	$("#side .side_news").mouseover(function(){
		$("#side .news").css("display","block").animate({"right":"36"},200);
	}).mouseout(function(){
		timer_news=setTimeout(function(){
			$("#side .news").css({"right":"50px","display":"none"});
		},300);
	});
	$("#side .news").mouseover(function(){
		clearInterval(timer_news);
		$(this).css({"right":"36px","display":"block"});
	}).mouseout(function(){
		$(this).css({"right":"50px","display":"none"});
	});

	var timer_kefu;
	$("#side .side_kefu").mouseover(function(){
		$("#side .kefu").css("display","block").animate({"right":"36"},200);
	}).mouseout(function(){
		timer_kefu=setTimeout(function(){
			$("#side .kefu").css({"right":"50px","display":"none"});
		},300);
	});
	$("#side .kefu").mouseover(function(){
		clearInterval(timer_kefu);
		$(this).css({"right":"36px","display":"block"});
	}).mouseout(function(){
		$(this).css({"right":"50px","display":"none"});
	});
	
	var timer_ewm;
	$("#side .side_ewm").mouseover(function(){
		$("#side .ewm").css("display","block").animate({"right":"36"},200);
	}).mouseout(function(){
		timer_ewm=setTimeout(function(){
			$("#side .ewm").css({"right":"50px","display":"none"});
		},300);
	});
	$("#side .ewm").mouseover(function(){
		clearInterval(timer_ewm);
		$(this).css({"right":"36px","display":"block"});
	}).mouseout(function(){
		$(this).css({"right":"50px","display":"none"});
	});
	
	$(".side_up").click(function(){
		timer1=setInterval(function(){
			var 
				scrollT=document.documentElement.scrollTop||document.body.scrollTop,
				
				speed=Math.round((0-scrollT)/10);
			document.documentElement.scrollTop=document.body.scrollTop=scrollT+speed;
			
			if(speed==0){
				clearInterval(timer1);
			}
		},30);
	});
	
});







